home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!news
- From: Mschae04@ix.netcom.com (Mark Schaefer)
- Newsgroups: comp.lang.c++
- Subject: Re: Newbie question
- Date: Mon, 15 Apr 1996 13:42:35 GMT
- Organization: Netcom
- Message-ID: <4ktjr5$6go@dfw-ixnews7.ix.netcom.com>
- References: <4kq1d5$253@ginger.lei.net>
- NNTP-Posting-Host: ix-tac-wa2-04.ix.netcom.com
- X-NETCOM-Date: Mon Apr 15 8:44:05 AM CDT 1996
- X-Newsreader: Forte Free Agent 1.0.82
-
- anomoous@penet.fi wrote:
-
- >I just started a C++ class in school, and I was writing my first project. I
- >have to include a char, double, int, and a string. The program compiled just
- >fine, but when I run the program I get a fatal error that says I have a float
- >overflow. I know I must be missing something extremely basic, but the help
- >files were no help. The input was digit with two decimal places. I used the
- >following statement to define the precision.
- >cout.setf(ios::showpoint);
- >cout.precision (4);
-
- >Any help would be appreciated.
-
- >Everyone was once a Newbie........I think.
- I'm new at C++, as well as posting, but here goes. The book I'm using
- says to include cout.setf(ios::fixed); with the other two cout
- statements you listed in your message. Good luck.
-
-